package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Chat;
import cn.wolfcode.trip.base.query.ChatQuery;
import cn.wolfcode.trip.base.vo.ChatListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChatMapper {
    int insert(Chat record);

    List<ChatListVO> queryForList(ChatQuery qo);

    void updateStateByChatId(@Param("id") Long id, @Param("state") Integer state);

    List<Chat> listChatHistory(@Param("sendUserId") Long sendUserId, @Param("receiveUserId") Long receiveUserId);

    void updateStateBySUIdAndRUId(@Param("sendUserId") Long sendUserId, @Param("receiveUserId") Long receiveUserId);
}